home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / emula / arosdv19.lha / AROS / dos / makefile < prev    next >
Makefile  |  1996-10-25  |  2KB  |  50 lines

  1. # $Id: makefile,v 1.18 1996/10/25 14:28:55 aros Exp $
  2. TOP=..
  3.  
  4. include $(TOP)/config/make.cfg
  5.  
  6. FILES = dos_init dos_functable lddemon errorlist loadseg_elf doname
  7. FUNCTIONS = \
  8.     adddosentry addprocess allocdosobject assignlock attemptlockdoslist \
  9.     cli close createnewproc currentdir datetostr delay duplock exall    \
  10.     examine fgetc findarg finddosentry flush fputc fputs freeargs        \
  11.     freedosentry freedosobject getargstr input ioerr isinteractive        \
  12.     loadseg lockdoslist makedosentry maxcli namefromlock open        \
  13.     openfromlock output printfault putstr read readargs readitem        \
  14.     remdosentry runcommand seek selectinput selectoutput setioerr        \
  15.     setowner strtolong ungetc unloadseg unlockdoslist vfprintf        \
  16.     vprintf write filepart addbuffers changemode createdir deletefile   \
  17.     exallend isfilesystem lock matchpattern matchpatternnocase        \
  18.     parsepattern parsepatternnocase setcomment setfiledate setfilesize  \
  19.     setprotection pathpart
  20.  
  21. all: setup \
  22.     $(foreach f,$(FILES),$(OSGENDIR)/$(f).o) \
  23.     $(foreach f,$(FUNCTIONS),$(OSGENDIR)/$(f).o)
  24.  
  25. setup :
  26.     @if [ ! -d $(OSGENDIR) ]; then $(MKDIR) $(OSGENDIR) ; else true ; fi
  27.  
  28. clean:
  29.     $(RM) $(OSGENDIR) *.err $(LIBDIR)/libdos.a
  30.  
  31. $(OSGENDIR)/%.o: %.c
  32.     $(CC) $(CFLAGS) $< -c -o $@ 2>&1|tee $*.err
  33.     if test ! -s $*.err; then rm $*.err ; else true ; fi
  34.  
  35. dos_functable.c : $(foreach f,$(FUNCTIONS),$(f).c) \
  36.         $(TOP)/scripts/makefunctable.awk
  37.     gawk -f $(TOP)/scripts/makefunctable.awk \
  38.         --assign lib=Dos \
  39.         $^
  40.  
  41. $(OSGENDIR)/%.d: %.c
  42.     @if [ ! -d $(OSGENDIR) ]; then $(MKDIR) $(OSGENDIR) ; else true ; fi
  43.     @$(RM) $@
  44.     @touch $@
  45.     $(MKDEPEND) -p$(OSGENDIR)/
  46.  
  47. include $(foreach f,$(FILES),$(OSGENDIR)/$(f).d)
  48. include $(foreach f,$(FUNCTIONS),$(OSGENDIR)/$(f).d)
  49.  
  50.